package com.xiao.sulinguser.vo;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @author: 1322127758@qq.com
 * @date: 2022/3/13 16:04
 * @作用:
 */
@Data
public class UserSubmitVo {
    /**昵称*/
    //该属性不能为null
    @NotEmpty(message="昵称不能为空")
    @Pattern(regexp = "^(?!_)(?!.*?_$)[\\w?=.#!@$%^&-*\\u4e00-\\u9fa5]{2,16}$",message = "昵称格式错误")
    private String nickname;
    /**账号*/
    //该属性不能为null
    @NotEmpty(message = "账号不能为null")
    @Pattern(regexp = "[\\w_@.-]{6,15}",message = "账号格式错误")
    private String username;
    /**密码*/
    //该属性不能为null
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "[\\w?=.#!@$%^&*-]{6,16}$",message = "密码格式错误")
    private String password;
    /**手机号*/
    //该属性不能为null
    @NotEmpty(message = "手机号不能为空")
    @Pattern(regexp = "^1[1-9]\\d{9}$",message = "手机号格式错误")
    private String mobile;
    /**验证码*/
    //该属性不能为null
    @NotEmpty(message = "验证码不能为null")
    @Pattern(regexp = "^[\\w]{6}$",message = "验证码格式错误")
    private String code;
}